package org.lt.resume.controller.subcompany;

import org.lt.resume.domain.company.SubCompanyInfo;
import org.lt.resume.service.subcompanyserviceInterface.SubCompanyServiceInterface;

import com.opensymphony.xwork2.ActionSupport;

public class SaveSubCompanyController extends ActionSupport{

	/** **/
	private static final long serialVersionUID = -6947488346461442264L;

	private SubCompanyServiceInterface subCompanyService; 
	
	private String id;
//	
//	private String name;
//	
//	private String address;
//	
//	private String memo;

	private SubCompanyInfo subcompany = new SubCompanyInfo();
	
	@Override
	public String execute() throws Exception {
		int i = Integer.valueOf(this.id);
		subcompany.setId(i);
		System.out.println(""+subcompany.getName());
		System.out.println(""+subcompany.getId());
		subCompanyService.updateSubCompany(subcompany);
		return null;
	}

	public SubCompanyServiceInterface getSubCompanyService() {
		return subCompanyService;
	}

	public void setSubCompanyService(SubCompanyServiceInterface subCompanyService) {
		this.subCompanyService = subCompanyService;
	}

	public SubCompanyInfo getSubcompany() {
		return subcompany;
	}

	public void setSubcompany(SubCompanyInfo subcompany) {
		this.subcompany = subcompany;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setName(String name) {
		subcompany.setName(name);
	}

	public void setAddress(String address) {
		subcompany.setAddress(address);
	}

	public void setMemo(String memo) {
		subcompany.setMemo(memo);
	}

	
	
}
